home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 November / Chip Kasım 2000.iso / prog / share / 11 / setup.exe / %MAINDIR% / DEMOS / CIMAIL / INTMAIL / send.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-09-07  |  14.3 KB  |  452 lines

  1. VERSION 4.00
  2. Begin VB.Form Send 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H80000005&
  5.    Caption         =   "Send Mail"
  6.    ClientHeight    =   5640
  7.    ClientLeft      =   2100
  8.    ClientTop       =   1320
  9.    ClientWidth     =   6690
  10.    Height          =   6045
  11.    Icon            =   "Send.frx":0000
  12.    Left            =   2040
  13.    LinkTopic       =   "Form1"
  14.    LockControls    =   -1  'True
  15.    ScaleHeight     =   5640
  16.    ScaleWidth      =   6690
  17.    ShowInTaskbar   =   0   'False
  18.    Top             =   975
  19.    Width           =   6810
  20.    Begin VB.PictureBox AttachmentFrame 
  21.       Appearance      =   0  'Flat
  22.       BackColor       =   &H00FFFFFF&
  23.       ForeColor       =   &H80000008&
  24.       Height          =   255
  25.       Left            =   180
  26.       ScaleHeight     =   225
  27.       ScaleWidth      =   3405
  28.       TabIndex        =   10
  29.       Top             =   1980
  30.       Visible         =   0   'False
  31.       Width           =   3435
  32.       Begin VB.Image PaperClip 
  33.          Height          =   480
  34.          Left            =   -30
  35.          MouseIcon       =   "Send.frx":0442
  36.          MousePointer    =   99  'Custom
  37.          Picture         =   "Send.frx":0594
  38.          Top             =   -150
  39.          Width           =   480
  40.       End
  41.       Begin VB.Label AttachmentName 
  42.          AutoSize        =   -1  'True
  43.          BackStyle       =   0  'Transparent
  44.          ForeColor       =   &H00000000&
  45.          Height          =   195
  46.          Left            =   375
  47.          TabIndex        =   11
  48.          Top             =   15
  49.          Width           =   3015
  50.          WordWrap        =   -1  'True
  51.       End
  52.    End
  53.    Begin VB.TextBox MessageText 
  54.       BackColor       =   &H00FFFFFF&
  55.       BorderStyle     =   0  'None
  56.       Height          =   3195
  57.       Left            =   870
  58.       MultiLine       =   -1  'True
  59.       ScrollBars      =   2  'Vertical
  60.       TabIndex        =   4
  61.       Top             =   2415
  62.       Width           =   5820
  63.    End
  64.    Begin VB.TextBox CopyTo 
  65.       Appearance      =   0  'Flat
  66.       BackColor       =   &H00FFFFFF&
  67.       BorderStyle     =   0  'None
  68.       Height          =   285
  69.       Left            =   2100
  70.       TabIndex        =   1
  71.       Top             =   1245
  72.       Width           =   3510
  73.    End
  74.    Begin VB.TextBox Subject 
  75.       Appearance      =   0  'Flat
  76.       BackColor       =   &H00FFFFFF&
  77.       BorderStyle     =   0  'None
  78.       Height          =   285
  79.       Left            =   2100
  80.       TabIndex        =   3
  81.       Top             =   1590
  82.       Width           =   3510
  83.    End
  84.    Begin VB.TextBox SendTo 
  85.       Appearance      =   0  'Flat
  86.       BackColor       =   &H00FFFFFF&
  87.       BorderStyle     =   0  'None
  88.       Height          =   285
  89.       Left            =   2100
  90.       TabIndex        =   0
  91.       Top             =   915
  92.       Width           =   3510
  93.    End
  94.    Begin VB.PictureBox LeftBorder 
  95.       Appearance      =   0  'Flat
  96.       BackColor       =   &H00C0FFFF&
  97.       BorderStyle     =   0  'None
  98.       ForeColor       =   &H80000008&
  99.       Height          =   20000
  100.       Left            =   -30
  101.       ScaleHeight     =   19995
  102.       ScaleWidth      =   795
  103.       TabIndex        =   7
  104.       Top             =   0
  105.       Width           =   795
  106.       Begin VB.Label AttachLabel 
  107.          Alignment       =   2  'Center
  108.          BackStyle       =   0  'Transparent
  109.          Caption         =   "Attach"
  110.          BeginProperty Font 
  111.             name            =   "Comic Sans MS"
  112.             charset         =   0
  113.             weight          =   400
  114.             size            =   9.75
  115.             underline       =   0   'False
  116.             italic          =   0   'False
  117.             strikethrough   =   0   'False
  118.          EndProperty
  119.          Height          =   345
  120.          Left            =   120
  121.          MouseIcon       =   "Send.frx":089E
  122.          MousePointer    =   99  'Custom
  123.          TabIndex        =   13
  124.          Top             =   1590
  125.          Width           =   600
  126.          WordWrap        =   -1  'True
  127.       End
  128.       Begin VB.Image AttachIcon 
  129.          Height          =   480
  130.          Left            =   195
  131.          MouseIcon       =   "Send.frx":09F0
  132.          MousePointer    =   99  'Custom
  133.          Picture         =   "Send.frx":0B42
  134.          Top             =   1830
  135.          Width           =   480
  136.       End
  137.       Begin VB.Label SendLabel 
  138.          Alignment       =   2  'Center
  139.          BackStyle       =   0  'Transparent
  140.          Caption         =   "Send"
  141.          BeginProperty Font 
  142.             name            =   "Comic Sans MS"
  143.             charset         =   0
  144.             weight          =   400
  145.             size            =   9.75
  146.             underline       =   0   'False
  147.             italic          =   0   'False
  148.             strikethrough   =   0   'False
  149.          EndProperty
  150.          Height          =   345
  151.          Left            =   105
  152.          MouseIcon       =   "Send.frx":0F84
  153.          MousePointer    =   99  'Custom
  154.          TabIndex        =   12
  155.          Top             =   45
  156.          Width           =   600
  157.          WordWrap        =   -1  'True
  158.       End
  159.       Begin VB.Image SendIcon 
  160.          Height          =   480
  161.          Left            =   180
  162.          MouseIcon       =   "Send.frx":10D6
  163.          MousePointer    =   99  'Custom
  164.          Picture         =   "Send.frx":1228
  165.          Top             =   285
  166.          Width           =   480
  167.       End
  168.       Begin VB.Label ExitButton 
  169.          Alignment       =   2  'Center
  170.          BackStyle       =   0  'Transparent
  171.          Caption         =   "Exit"
  172.          BeginProperty Font 
  173.             name            =   "Comic Sans MS"
  174.             charset         =   0
  175.             weight          =   400
  176.             size            =   9.75
  177.             underline       =   0   'False
  178.             italic          =   0   'False
  179.             strikethrough   =   0   'False
  180.          EndProperty
  181.          Height          =   345
  182.          Left            =   105
  183.          MouseIcon       =   "Send.frx":166A
  184.          MousePointer    =   99  'Custom
  185.          TabIndex        =   8
  186.          Top             =   5295
  187.          Width           =   600
  188.          WordWrap        =   -1  'True
  189.       End
  190.    End
  191.    Begin VB.Label ReturnAddress 
  192.       AutoSize        =   -1  'True
  193.       BackStyle       =   0  'Transparent
  194.       Caption         =   "Return Address"
  195.       Height          =   195
  196.       Left            =   900
  197.       TabIndex        =   9
  198.       Top             =   75
  199.       Width           =   2175
  200.       WordWrap        =   -1  'True
  201.    End
  202.    Begin VB.Image PickAddress 
  203.       Height          =   285
  204.       Index           =   1
  205.       Left            =   5655
  206.       MouseIcon       =   "Send.frx":17BC
  207.       MousePointer    =   99  'Custom
  208.       Picture         =   "Send.frx":190E
  209.       Top             =   1275
  210.       Width           =   300
  211.    End
  212.    Begin VB.Image PickAddress 
  213.       Height          =   285
  214.       Index           =   0
  215.       Left            =   5655
  216.       MouseIcon       =   "Send.frx":1ECC
  217.       MousePointer    =   99  'Custom
  218.       Picture         =   "Send.frx":201E
  219.       Top             =   945
  220.       Width           =   300
  221.    End
  222.    Begin VB.Line lneBorder 
  223.       BorderColor     =   &H00808000&
  224.       Index           =   3
  225.       X1              =   780
  226.       X2              =   20000
  227.       Y1              =   2340
  228.       Y2              =   2340
  229.    End
  230.    Begin VB.Line lneBorder 
  231.       BorderColor     =   &H00000000&
  232.       Index           =   2
  233.       X1              =   795
  234.       X2              =   795
  235.       Y1              =   0
  236.       Y2              =   20000
  237.    End
  238.    Begin VB.Line Underline 
  239.       BorderColor     =   &H00C0C0C0&
  240.       Index           =   2
  241.       X1              =   2100
  242.       X2              =   5625
  243.       Y1              =   1875
  244.       Y2              =   1875
  245.    End
  246.    Begin VB.Line Underline 
  247.       BorderColor     =   &H00C0C0C0&
  248.       Index           =   1
  249.       X1              =   2100
  250.       X2              =   5625
  251.       Y1              =   1530
  252.       Y2              =   1530
  253.    End
  254.    Begin VB.Line Underline 
  255.       BorderColor     =   &H00C0C0C0&
  256.       Index           =   0
  257.       X1              =   2100
  258.       X2              =   5625
  259.       Y1              =   1200
  260.       Y2              =   1200
  261.    End
  262.    Begin VB.Label lblGeneric 
  263.       Alignment       =   1  'Right Justify
  264.       BackStyle       =   0  'Transparent
  265.       Caption         =   "Copy:"
  266.       ForeColor       =   &H00808080&
  267.       Height          =   240
  268.       Index           =   2
  269.       Left            =   1290
  270.       MouseIcon       =   "Send.frx":25DC
  271.       MousePointer    =   99  'Custom
  272.       TabIndex        =   5
  273.       Top             =   1245
  274.       Width           =   690
  275.    End
  276.    Begin VB.Label lblGeneric 
  277.       Alignment       =   1  'Right Justify
  278.       BackStyle       =   0  'Transparent
  279.       Caption         =   "To:"
  280.       ForeColor       =   &H00808080&
  281.       Height          =   240
  282.       Index           =   1
  283.       Left            =   1290
  284.       MouseIcon       =   "Send.frx":272E
  285.       MousePointer    =   99  'Custom
  286.       TabIndex        =   6
  287.       Top             =   915
  288.       Width           =   690
  289.    End
  290.    Begin VB.Line lneBorder 
  291.       BorderColor     =   &H00808000&
  292.       BorderWidth     =   2
  293.       Index           =   0
  294.       X1              =   780
  295.       X2              =   780
  296.       Y1              =   0
  297.       Y2              =   20000
  298.    End
  299.    Begin VB.Line lneBorder 
  300.       BorderColor     =   &H00000000&
  301.       Index           =   1
  302.       X1              =   780
  303.       X2              =   20000
  304.       Y1              =   2355
  305.       Y2              =   2355
  306.    End
  307.    Begin VB.Image Stamp 
  308.       Height          =   330
  309.       Left            =   6120
  310.       Picture         =   "Send.frx":2880
  311.       Top             =   60
  312.       Width           =   495
  313.    End
  314.    Begin VB.Label lblGeneric 
  315.       Alignment       =   1  'Right Justify
  316.       BackStyle       =   0  'Transparent
  317.       Caption         =   "Subject:"
  318.       ForeColor       =   &H00808080&
  319.       Height          =   240
  320.       Index           =   0
  321.       Left            =   1290
  322.       TabIndex        =   2
  323.       Top             =   1590
  324.       Width           =   690
  325.    End
  326.    Begin VB.Menu mnuAttach 
  327.       Caption         =   "Attachment"
  328.       Visible         =   0   'False
  329.       Begin VB.Menu mnuAttachSelect 
  330.          Caption         =   "Select File to Attach"
  331.       End
  332.       Begin VB.Menu mnuAttachDelete 
  333.          Caption         =   "Delete Attachment"
  334.       End
  335.    End
  336. Attribute VB_Name = "Send"
  337. Attribute VB_Creatable = False
  338. Attribute VB_Exposed = False
  339. Option Explicit
  340. '<Public>---------------------------------------------
  341. Public FormNumber       As Integer
  342. '</Public>--------------------------------------------
  343. Private Sub AttachFile(CancelClears As Boolean)
  344.     Dim FileName    As String
  345.     FileName = ControlPanel.SelectFile(".*", "Attach File")
  346.     If (FileName = "") Then
  347.         If CancelClears Then
  348.             AttachmentName = ""
  349.             AttachmentFrame.Visible = False
  350.         End If
  351.     Else
  352.         AttachmentFrame.Width = TextWidth(FileName) + 520
  353.         AttachmentName = FileName
  354.         AttachmentName.Width = TextWidth(FileName)
  355.         AttachmentFrame.Visible = True
  356.     End If
  357. End Sub
  358. Private Sub AttachIcon_Click()
  359.     If AttachmentFrame.Visible Then
  360.         PopupMenu mnuAttach
  361.     Else
  362.         Call AttachFile(True)
  363.     End If
  364. End Sub
  365. Private Sub AttachLabel_Click()
  366.     If AttachmentFrame.Visible Then
  367.         PopupMenu mnuAttach
  368.     Else
  369.         Call AttachFile(True)
  370.     End If
  371. End Sub
  372. Private Sub ExitButton_Click()
  373.     Unload Me
  374. End Sub
  375. Private Sub AttachmentName_Click()
  376.     PopupMenu mnuAttach
  377. End Sub
  378. Private Sub Form_Load()
  379.     ReturnAddress = Properties.RealName & vbCrLf & Properties.SenderName
  380.     Call GetWindowState(Me, "InternetMailSendWindow")
  381. End Sub
  382. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  383.     Call SetWindowState(Me, "InternetMailSendWindow")
  384.     Call ControlPanel.DestroySendForm(FormNumber)
  385. End Sub
  386. Private Sub Form_Resize()
  387.     Dim TextBoxWidth    As Integer
  388.     On Error Resume Next
  389.     TextBoxWidth = Me.ScaleWidth - SendTo.left - 1410
  390.     SendTo.Width = TextBoxWidth - 240
  391.     CopyTo.Width = TextBoxWidth - 240
  392.     Subject.Width = TextBoxWidth - 240
  393.     Underline(0).X2 = TextBoxWidth + 1965
  394.     Underline(1).X2 = TextBoxWidth + 1965
  395.     Underline(2).X2 = TextBoxWidth + 1965
  396.     PickAddress(0).left = Underline(0).X2 + 30
  397.     PickAddress(1).left = Underline(0).X2 + 30
  398.     MessageText.Move MessageText.left, MessageText.Top, Me.ScaleWidth - MessageText.left, Me.ScaleHeight - MessageText.Top
  399.     Stamp.left = Me.ScaleWidth - 560
  400.     ExitButton.Top = Me.ScaleHeight - 340
  401. End Sub
  402. Private Sub mnuAttachDelete_Click()
  403.         
  404.         AttachmentName = ""
  405.         AttachmentFrame.Visible = False
  406.         
  407. End Sub
  408. Private Sub mnuAttachSelect_Click()
  409.     Call AttachFile(False)
  410. End Sub
  411. Private Sub CopyTo_GotFocus()
  412.     Call SelectText(CopyTo)
  413. End Sub
  414. Private Sub PickAddress_Click(Index As Integer)
  415.     With Addresses
  416.         .Show vbModal
  417.         If (Not .PressedOK) Then Exit Sub
  418.         If (Index = 0) Then
  419.             SendTo = .Selection
  420.         Else
  421.             CopyTo = .Selection
  422.         End If
  423.     End With
  424. End Sub
  425. Private Sub SendNow()
  426.     '---- validate message
  427.     If (SendTo = "") Then
  428.         MsgBox "Please complete the 'To:' field before sending.", vbOKOnly + vbInformation, "Send Mail"
  429.         Exit Sub
  430.     End If
  431.     '---- set some public properties
  432.     Set ControlPanel.CurrentSendForm = Me
  433.     ControlPanel.IsAttachment = (AttachmentName <> "")
  434.     Call ControlPanel.ProcessMail
  435. End Sub
  436. Private Sub SendIcon_Click()
  437.     SendNow
  438. End Sub
  439. Private Sub SendLabel_Click()
  440.     SendNow
  441. End Sub
  442. Private Sub Subject_GotFocus()
  443.     Call SelectText(Subject)
  444. End Sub
  445. Private Sub SendTo_GotFocus()
  446.     Call SelectText(SendTo)
  447. End Sub
  448. Public Sub ShowOffset(OffsetLeft As Integer, OffsetTop As Integer)
  449.     '---- add additional offset
  450.     Me.Move OffsetLeft, OffsetTop
  451. End Sub
  452.